package com.zr.quotation.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;


@Data
public class QuotationAddVo {
    private String requestForQuotationId;
    @NotNull(message = "币别不能为空！")
    private Integer currencyCode;
    @NotNull(message = "询价状态不能为空！")
    private Integer inquiryStatus;
    @NotNull(message = "法人Id不能为空！")
    private Integer legalPersonId;
    @NotNull(message = "询价类型不能为空！")
    private Integer type;
    @NotNull(message = "是否含税不能为空！")
    private Integer isTax;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private Date startTime;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private Date endTime;
    @NotEmpty(message = "备件信息不能为空！")
    @Valid
    private List<QuotationSpareCodeVo> inquiryDetailsList;

    @NotEmpty(message = "供应商信息不能为空！")
    @Valid
    private List<QuotationSupplierVo> supplierDetailsList;

}
